Skip to content

fix: 桌面宠物全线可用 + Cursor CLI 适配 - #1

Merged
cursor[bot] merged 2 commits into
mainfrom
cursor/desktop-pet-fully-usable-80bb
Jul 14, 2026
Merged

fix: 桌面宠物全线可用 + Cursor CLI 适配#1
cursor[bot] merged 2 commits into
mainfrom
cursor/desktop-pet-fully-usable-80bb

Conversation

@Nardo021

@Nardo021 Nardo021 commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

让 Friday 桌面宠物在 Cursor 本地 CLI / Cloud 路径上真正可用:修复默认 PTY 生命周期、CLI 参数丢失 prompt、stream-json 解析过时、会话状态不同步,并补齐 onboarding/设置探测与诚实的高风险命令审批体验。

Key fixes

P0 — Cursor Local CLI 可靠性

  • PTY stop:Ctrl+C → 3s grace → kill(不再裸 wait() 挂死)
  • PTY PID:记录子进程 PID,排除外部 discovery 重复 attach
  • PTY writer:复用长期 writer,follow-up 不再每次 take_writer()
  • PTY exit watch:进程退出后发出终态,避免会话永久 “running”
  • CLI args:默认模板含 {prompt};无占位符时自动追加 prompt,避免任务空跑
  • stream-json 解析:对齐当前 Cursor 事件(system/initassistanttool_call started/completed、result),产出 CommandCompleted
  • SessionManager 同步:Done/Error/Stopped 释放 owned-CLI 槽位;重启后清理陈旧 running 本地会话

P1 — 可用性与 Cursor 适配 UX

  • 审批改为 observe-and-stop(Acknowledge / Stop session),不再伪称“已暂停 Cursor”
  • Onboarding + Settings 增加 Cursor CLI 探测
  • Settings 增加 pet patrol / status bubble 开关
  • 快捷键 / 托盘 Stop 优先停 active running session
  • 文档对齐:Cloud adapter 为 live,SDK 仍为 stub
  • CI:Ubuntu 安装 GTK/WebKit 系统依赖,修复 Tauri Linux 构建

Verification

  • cargo test --lib -- cursor_parser launcher8 passed
  • npm run build -w @friday/desktop → tsc + vite OK
  • npm run build -w @friday/agent-core|bridge-client + mobile typecheck → OK

How to try

  1. 安装 cursor-agent 并保证在 PATH
  2. npm run tauri:dev
  3. Onboarding 可 Skip(Local CLI)或填 crsr_(Cloud)
  4. Quick Chat / Panel → Local CLI 发 prompt,看宠物状态与时间线
Open in Web Open in Cursor 

Harden PTY lifecycle (stop, PID, writer, exit watch), ensure prompts
always reach cursor-agent, parse current stream-json events, sync
SessionManager so owned-CLI slots free, and surface honest approvals
plus CLI probing in onboarding/settings.

Co-authored-by: Leo <Nardo021@users.noreply.github.com>
@Nardo021
Nardo021 marked this pull request as ready for review July 14, 2026 21:36
Co-authored-by: Leo <Nardo021@users.noreply.github.com>
@cursor
cursor Bot merged commit 4ad8979 into main Jul 14, 2026
3 checks passed
@cursor
cursor Bot deleted the cursor/desktop-pet-fully-usable-80bb branch July 14, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants